package BD;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.Statement;

import javax.swing.JOptionPane;

public class BD extends Conexion{


	public static void main(String[] args) {
		
		/******* Conexion con la base de datos *********/
		Conexion conector = new Conexion();		
		conector.conexion();
		
			
	try {	/**************** Consulta SQL *****************/					
		ResultSet rs = getSt().executeQuery("SELECT * FROM actores");	
		while(rs.next())		{ 	
								/** Registro (columna 1 y 2)de la base de datos **/
			System.out.println(rs.getString(1)+" "+rs.getString(2));	
								
		} 				
	
		} catch (Exception e1) 
		{
			System.out.println("Error al realizar la consulta");
		}
	
	}
	
}
